Skip to content

Preserve Record argument evaluation order when hoisting - #16138

Closed
lukaszsamson wants to merge 1 commit into
elixir-lang:mainfrom
lukaszsamson:codex/record-evaluation-order
Closed

lukaszsamson wants to merge 1 commit into
elixir-lang:mainfrom
lukaszsamson:codex/record-evaluation-order

Conversation

@lukaszsamson

Copy link
Copy Markdown
Contributor

When hoisting is needed, capture bare-variable fields and the update base in source order, leaving only literals inline. This preserves values across rebinding and removes false unused-variable warnings.

Assisted-by: Codex:GPT-6

Fixes #16137

@josevalim

Copy link
Copy Markdown
Member

Oh, I had already sent a PR, thanks though!

@josevalim josevalim closed this Nov 16, 2026
@lukaszsamson

Copy link
Copy Markdown
Contributor Author

Oh, I had already sent a PR, thanks though!

No problem. I see you went further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Record creation and updates can evaluate arguments out of order

2 participants